export default {
  methods: {
    // 拼接搜索内容 格式 [ , ]
    searchMixin(agent, name, msg) {
      // console.log(msg[1], msg[0])
      if (agent !== '') {
        if (Array.isArray(agent) === true) {
          agent = [msg[1], ...agent]
        } else {
          agent = [msg[1], agent]
        }
        //   去重
        agent = [...new Set(agent)]
      }
      if (name !== '') {
        if (Array.isArray(name) === true) {
          name = [msg[0], ...name]
        } else {
          name = [msg[0], name]
        }
        //   去重
        name = [...new Set(name)]
      }
      return [agent, name]
    }
  }
}
